<template>
	<view class="padding-30">
		<shop-goodsa :list="giftList" isList @goodsClick="goodsClick"></shop-goodsa>
	</view>
</template>

<script>
	import shopGoodsa from "@/components/goods/shopGoodsa.vue"
	export default {
		components: {
			shopGoodsa
		},
		data(){
			return{
				giftList: []
			}
		},
		onShow() {
			this.getSpecies()
		},
		methods:{
			getSpecies(){
				this.$http.post(this.$api.getSpecies,{},{token:true}).then(res=>{
					this.giftList = res.data.map(item=>{
						return {
							id:item.id,
							goods_image: item.image,
							goods_name: item.name,
							goods_desc: '',
							goods_price:item.price,
							benName: "购买",
							type:'0',
							status11:'不显示',
							path:'/pages/index/index-list/commemorative-coin-info?item='+JSON.stringify(item)
						}
					})
				})
			},
			goodsClick(item){
				this.$tools.navigateTo(item.path)
			}
		}
	}
</script>

<style lang="scss">
</style>